﻿<%@ Page Title="" Language="C#" MasterPageFile="~/App_MasterPages/layout.Master" AutoEventWireup="true" CodeBehind="RSManageContact.aspx.cs" Inherits="mojoPortal.Web.RS.SBM.RSManageContact" %>
<%@ Register Src="~/rs/controls/modalactionmessagecontrol.ascx" TagName="ModalActionMessageControl" TagPrefix="uc1" %>
<%@ Register Src="controls/locationcontrol.ascx" TagName="LocationControl" TagPrefix="uc1" %>
<%@ Register Src="controls/locationheadercontrol.ascx" TagName="LocationHeaderControl" TagPrefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="leftContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="mainContent" runat="server">

<uc1:LocationHeaderControl ID="ucLocationHeaderControl1" runat="server"/>

<table width="100%">
<tr>
<td width="20%"><asp:Button ID="btnReturn" runat="server" Text="Return" OnClick="btnReturn_Click" />&nbsp;<asp:Button ID="btnAddNewContact" runat="server" Text="New Contact" OnClick="btnAddNewContact_Click" /></td>
<td align="center"><font color="navy"><i>Please choose contacts from list</i></font></td>
<td width="10%"></td>
</tr>
</table>

<div class="page">
    <asp:GridView ID="gvLookupContact" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" CellPadding="4" DataKeyNames="ContactId" 
        ForeColor="#333333" GridLines="None" OnSelectedIndexChanged="gvLookupContact_SelectedIndexChanged" OnPageIndexChanging="gvLookupContact_PageIndexChanging" OnSorting="gvLookupContact_Sorting" Width="100%">
    <AlternatingRowStyle BackColor="White" />
    <Columns>
        <asp:CommandField ShowSelectButton="True" ButtonType="Image" SelectImageUrl="~/RS/Images/contact.gif"/>
        <asp:BoundField DataField="LastName" HeaderText="LastName" SortExpression="LastName" HeaderStyle-HorizontalAlign="Left"/>
        <asp:BoundField DataField="FirstName" HeaderText="FirstName" SortExpression="FirstName" HeaderStyle-HorizontalAlign="Left"/>
        <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" HeaderStyle-HorizontalAlign="Left"/>
        <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" HeaderStyle-HorizontalAlign="Left"/>
        <asp:BoundField DataField="Phone" HeaderText="Phone" SortExpression="Phone" HeaderStyle-HorizontalAlign="Left"/>
        <asp:BoundField DataField="Mobile" HeaderText="Mobile" SortExpression="Mobile" HeaderStyle-HorizontalAlign="Left"/>
        <asp:CheckBoxField DataField="Active" HeaderText="Active" SortExpression="Active" HeaderStyle-HorizontalAlign="Left"/>
    </Columns>
    <EditRowStyle BackColor="#2461BF" />
    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
    <RowStyle BackColor="#EFF3FB" />
    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
    <SortedAscendingCellStyle BackColor="#F5F7FB" />
    <SortedAscendingHeaderStyle BackColor="#6D95E1" />
    <SortedDescendingCellStyle BackColor="#E9EBEF" />
    <SortedDescendingHeaderStyle BackColor="#4870BE" />
    <EmptyDataTemplate><br />
        <center><asp:Label ID="lblNoRecordFound" runat="server" Text="No Match Found" Font-Bold="True" ForeColor="Silver"></asp:Label></center>
    </EmptyDataTemplate>
    </asp:GridView>
</div>



<asp:Panel ID="pnlModalManageContact" runat="server" style="display: none" Width="100%" Height="100%" BorderStyle="Solid" BackColor="White" BorderColor="Silver">
<asp:UpdatePanel ID="UpdatePanelManageContact" runat="server">
<ContentTemplate>
<div align="right">
<asp:Button ID="btnSaveContact" runat="server" Text="Save" onclick="btnSave_Click" CausesValidation="false"/>
<asp:Button ID="btnDeleteContact" runat="server" Text="Delete" onclick="btnDelete_Click" CausesValidation="false"/>
<asp:Button ID="btnModalOK" runat="server" Text="Return" OnClick="btnModalOK_Click" CausesValidation="false" />
</div>
<center><asp:Label ID="lblMessage" runat="server" Font-Size="12" Font-Bold="true" Text="Add New Contact To Location"/></center>
<uc1:LocationHeaderControl ID="ucLocationHeaderControl2" runat="server"/>
<fieldset><legend>Contact Information</legend>
<table>
<tr><td colspan="2"></td></tr>
<tr><td width="100" align="right" nowrap>Billing Location ID:</td><td align="left"><asp:TextBox ID="txtBillingLocationId" runat="server" BackColor="#CCCCCC" ReadOnly="True" Width="40px" /></td></tr>
<tr><td width="100" align="right">Contact ID:</td><td align="left"><asp:TextBox ID="txtContactId" runat="server" BackColor="#CCCCCC" ReadOnly="True" Width="40px" /></td></tr>
<tr><td align="right">First Name:</td><td align="left"><asp:TextBox ID="txtFirstName" runat="server"></asp:TextBox></td></tr>
<tr><td align="right">Middle Name:</td><td align="left"><asp:TextBox ID="txtMiddleName" runat="server"></asp:TextBox></td></tr>
<tr><td align="right">Last Name:</td><td align="left"><asp:TextBox ID="txtLastName" runat="server"></asp:TextBox></td></tr>
<tr><td align="right">Title:</td><td align="left"><asp:TextBox ID="txtTitle" runat="server"></asp:TextBox></td></tr>
<tr><td align="right">Email:</td><td align="left"><asp:TextBox ID="txtEmail" runat="server"></asp:TextBox></td></tr>
<tr><td align="right">Phone:</td><td align="left"><asp:TextBox ID="txtPhone" runat="server"></asp:TextBox></td></tr>
<tr><td align="right">Mobile:</td><td align="left"><asp:TextBox ID="txtMobile" runat="server"></asp:TextBox></td></tr>
<tr><td align="right">Fax:</td><td align="left"><asp:TextBox ID="txtFax" runat="server"></asp:TextBox></td></tr>
<tr><td align="right">Note:</td><td align="left"><asp:TextBox ID="txtContactNote" runat="server" Height="100px" Width="350px" TextMode="MultiLine"></asp:TextBox></td></tr>
</table>
</fieldset>
<asp:HiddenField ID="hfRedirectURL" runat="server" />
<ajaxToolkit:ConfirmButtonExtender ID="cbe" runat="server" TargetControlID="btnDeleteContact" ConfirmText="Are you sure you want to delete this contact?"/>

<br />

<asp:Button ID="btnModalHidden" runat="server" style="display: none" />

<asp:HiddenField ID="hfReturnURL" runat="server" />
</ContentTemplate>
</asp:UpdatePanel>
</asp:Panel>
<asp:LinkButton ID="lnkButtonFake" runat="server" style="display:none"></asp:LinkButton>
<ajaxToolkit:ModalPopupExtender ID="mpeModalManageContact" runat="server" TargetControlID="lnkButtonFake" OkControlID="btnModalHidden" PopupControlID="pnlModalManageContact"  DropShadow="true" BackgroundCssClass="modalBackground"/>






<uc1:ModalActionMessageControl ID="ucModalActionMessageControl" runat="server"/>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="rightContent" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="pageEditContent" runat="server">
</asp:Content>
